package com.hkyl.hospital.config;

import com.hkyl.hospital.domain.ResultVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author hyh
 * @date 2023/07/01 10:01:58
 */
@RestControllerAdvice
public class GlobalExceptionHandler{

    @ExceptionHandler(Exception.class)
    public ResultVo f(Exception e){
        e.printStackTrace();
        return ResultVo.failure("出错了！", e.toString());
    }

}
